﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	磷石膏堆积坝（每日）
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="dolphincontainer">
	    <div id="dolphinnav">
	        <ul>
                <li><a href="/Record/StackWater/<%=ViewData["id"]%>?date=<%=(DateTime)ViewData["date"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>水位及水质</span></a></li>
                <li><a href="/Record/BackWater/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["date"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>进浆及回水</span></a></li>
                <li><a href="/Record/Settle/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["date"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>沉降及位移观测</span></a></li>
                <li><a href="/Record/Ardealite/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["date"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>磷石膏堆积坝</span></a></li>
                <li><a href="javascript:return(false);" class="current"><span>截洪沟</span></a></li>
                <li><a href="/Record/PiezometerWell/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["date"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>测压井</span></a></li>
                <li><a href="/Record/PiezometerBase/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["date"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>测压仪</span></a></li>
                <li><a href="/Record/Drain/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["date"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>导渗系统</span></a></li>
	        </ul>
	    </div>
	</div>

    <%
        string[] positions = new string[] { "", "东", "东南", "南", "西南", "西", "西北", "北", "东北" };
        string ditchDesignPic = (string)ViewData["ditchDesignPic"];
        bool result = (bool)ViewData["success"];
        if(result){ 
     %>
           <div style="margin-top:20px;font-weight:bold;color:blue;text-align:center">截洪沟更新成功</div>
        <%
        }
        %>

    <% using (Html.BeginForm())
    {
        List<Runoff_Interception_Ditch_Base_Info> ditches = (List<Runoff_Interception_Ditch_Base_Info>)ViewData["ditchs"];
    %>
        <%= Html.ValidationSummary(true) %>
        <%= Html.Hidden("stack_id", ViewData["stack_id"])%>
        <%= Html.Hidden("ditchNos", ViewData["ditchNos"])%>
        <%= Html.Hidden("factoryId", ViewData["factoryId"]) %>
        <%= Html.Hidden("date", (DateTime)ViewData["date"])%>

    <table class="tableCss" cellspacing="0" cellpadding="0" align="center" border="0" style="margin-top:10px;">
        <tr>
            <th colspan="2" class="heightrow" align="center" style="text-align:center">
                截洪沟（每日）
            </th>
        </tr>
        <tr>
            <td class="row1" align="left" width="100px" style="padding-left:20px">测量人员：</td>
            <td class="row1" align="left">
                <%= Html.DropDownList("tester_id", ViewData["users"] as List<SelectListItem>, "请选择", new { style = "width:150px" })%>
            </td>
        </tr>
        <tr>
            <td class="row1" align="left" width="100px" style="padding-left:20px">查看截洪沟位置：</td>
            <td class="row1" align="left">
                &nbsp;<%if (!string.IsNullOrEmpty(ditchDesignPic)){ %><a href="<%=Url.Content((string)ViewData["ditchDesignPic"]) %>" target="_blank">截洪沟设计图</a><%} %>
            </td>
        </tr>
        <%foreach (Runoff_Interception_Ditch_Base_Info ditch in ditches) { %>
        <%
            Runoff_Interception_Ditch_daily_info ditchRecord = (Runoff_Interception_Ditch_daily_info)ViewData["dailyDitch" + ditch.ditch_no];
        %>
        <tr>
            <td colspan="2">
                <table width="100%" style="background-color:white;margin-top:30px">
                   <tr height="25px" valign="middle">
                     <td style="padding-left:20px">[<%=(ditch.position.HasValue ? positions[ditch.position.Value] : "")%>][<%=(ditch.El.HasValue ? ditch.El.Value.ToString() : "")%>]米高程截洪沟：</td>
                   </tr>
                   <tr height="25px" valign="middle">
                     <td style="padding-left:20px">侧壁或底部是否有裂纹产生：</td>
                   </tr>
                   <tr height="25px" valign="middle">
                     <td style="padding-left:20px"><input type="radio" name="is_Sidewall_Crack<%=ditch.ditch_no %>" value="1" <%if (ditchRecord.is_Sidewall_Crack == 1){ %>checked="checked"<%} %> />有<span style="margin-left:10px">&nbsp;</span><input type="radio" name="is_Sidewall_Crack<%=ditch.ditch_no %>" value="0" <%if (ditchRecord.is_Sidewall_Crack != 1){ %>checked="checked"<%} %> />无 </td>
                   </tr>
                   <tr height="25px" valign="middle">
                     <td style="padding-left:20px"><textarea rows="12" cols="80" name="Sidewall_Crack_description<%=ditch.ditch_no %>"><%= ditchRecord.Sidewall_Crack_description%></textarea></td>
                   </tr>
                   <tr height="25px" valign="middle">
                     <td style="padding-left:20px">截洪沟内是否发生淤堵：</td>
                   </tr>
                   <tr height="25px" valign="middle">
                     <td style="padding-left:20px"><input type="radio" name="is_Clogging<%=ditch.ditch_no %>" value="1" <%if (ditchRecord.is_Clogging == 1){ %>checked="checked"<%} %> />有<span style="margin-left:10px">&nbsp;</span><input type="radio" name="is_Clogging<%=ditch.ditch_no %>" value="0" <%if (ditchRecord.is_Clogging != 1){ %>checked="checked"<%} %> />无 </td>
                   </tr>
                   <tr height="25px" valign="middle">
                     <td style="padding-left:20px"><textarea rows="12" cols="80" name="Clogging_description<%=ditch.ditch_no %>"><%= ditchRecord.Clogging_description%></textarea></td>
                   </tr>
                   <tr height="25px" valign="middle">
                     <td style="padding-left:20px">外侧边坡是否有失稳迹象：</td>
                   </tr>
                   <tr height="25px" valign="middle">
                     <td style="padding-left:20px"><input type="radio" name="is_Instability<%=ditch.ditch_no %>" value="1" <%if (ditchRecord.is_Instability == 1){ %>checked="checked"<%} %> />有<span style="margin-left:10px">&nbsp;</span><input type="radio" name="is_Instability<%=ditch.ditch_no %>" value="0" <%if (ditchRecord.is_Instability != 1){ %>checked="checked"<%} %> />无 </td>
                   </tr>
                   <tr height="25px" valign="middle">
                     <td style="padding-left:20px"><textarea rows="12" cols="80" name="Instability_description<%=ditch.ditch_no %>"><%= ditchRecord.Instability_description%></textarea></td>
                   </tr>
                   <tr height="25px" valign="middle">
                     <td style="padding-left:20px">内侧道路是否出现裂纹：</td>
                   </tr>
                   <tr height="25px" valign="middle">
                     <td style="padding-left:20px"><input type="radio" name="is_Innerwall_Crack<%=ditch.ditch_no %>" value="1" <%if (ditchRecord.is_Innerwall_Crack == 1){ %>checked="checked"<%} %> />有<span style="margin-left:10px">&nbsp;</span><input type="radio" name="is_Innerwall_Crack<%=ditch.ditch_no %>" value="0" <%if (ditchRecord.is_Innerwall_Crack != 1){ %>checked="checked"<%} %> />无 </td>
                   </tr>
                   <tr height="25px" valign="middle">
                     <td style="padding-left:20px"><textarea rows="12" cols="80" name="Innerwall_Crack_description<%=ditch.ditch_no %>"><%= ditchRecord.Innerwall_Crack_description%></textarea></td>
                   </tr>
                </table>
            </td>
        </tr>
        <%} %>
        
    </table>
    <div style="margin-top:25px;text-align:center">
        <input type="submit" value="提    交" style="font-size:16px;font-weight:bold" />
    </div>
    <% } %>
</asp:Content>
